package com.bingxue.edu.management.system.model.resp;

import com.bingxue.edu.common.enums.OrgTypeEnum;
import com.bingxue.edu.common.enums.CommonStatusEnum;
import com.mybatisflex.annotation.RelationManyToOne;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 组织信息
 *
 * @author panbo
 * @since 2024/07/12 17:24
 */
@Data
@Schema(description = "组织信息")
public class OrgResp {

    @Schema(description = "id")
    private String id;

    @Schema(description = "上级id")
    private String parentId;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "简称")
    private String shortName;

    @Schema(description = "组织类型")
    private OrgTypeEnum orgType;

    @Schema(description = "负责人Id")
    private String leaderId;

    @Schema(description = "负责人姓名")
    @RelationManyToOne(
            selfField = "leaderId",
            targetTable = "base_employee",
            targetField = "id",
            valueField = "name"
    )
    private String leaderName;

    @Schema(description = "电话号码")
    private String telephone;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "排序号")
    private Integer sort;

    @Schema(description = "状态")
    private CommonStatusEnum status;
}
